﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MagnOS.Command
{
    class CommandParser
    {
        public void ParseCommand(string[] command)
        {
            /* Index 0 is always the command. From 1 to n, the parameters */

            string Com_ = command[0];

            switch(Com_){
                case "shutdown":
                    ShellCommands.Shutdown shdwn = new ShellCommands.Shutdown();
                    shdwn.Execute(command);
                    break;
                case "cls":
                    ShellCommands.ClearScreen cls = new ShellCommands.ClearScreen();
                    cls.Execute(command);
                    cls = null;
                    break;
                default:
                    Console.WriteLine("\"" + Com_ + "\" is not recognised as a valid command.");
                    break;
            }
        }
    }
}
